/* eslint-disable no-console */
import CustomFlowView from "@/components/CustomFlowView";
import useFlowView from "@/components/FlowView/useFlowView";
import { styled } from "@umijs/max";
import { useEffect } from "react";
const Box = styled.div`
  width: 100%;
  height: 500px;
`;
const Test = () => {
  const flowView = useFlowView();
  useEffect(() => {
    const xml = localStorage.getItem('bpmnXml') || '';
    flowView.setXml(xml);
    flowView.setProcessNodeInfo({
      finishedTaskSet: ['Start'],
      rejectedTaskSet: ['Task'],
      unfinishedTaskSet: ['End'],
      finishedSequenceFlowSet: ['Flow1', 'Flow2'],
    });
  }, []);
  return <Box>
    <CustomFlowView {...flowView} style={{ height: '100%' }} />
  </Box>;
};

export default Test;